/**
 * 收货地址相关API
 */

import {
	http,
	Method
} from "@/utils/request.js";

import api from "@/config/api.js";

/**
 * 获取用户地址列表
 * @returns {AxiosPromise}
 */
export function getAddressList(params) {
	return http.request({
		url: "/api/account/addressList",
		method: Method.GET,
		params,
	});
}

/**
 * 添加用户地址
 * @returns {AxiosPromise}
 */
export function addAddress(params) {
	return http.request({
		url: "/api/account/addAddress",
		method: Method.POST,
		data: params,
	});
}


/**
 * 编辑用户地址
 * @returns {AxiosPromise}
 */
export function editAddress(params) {
	return http.request({
		url: "/api/account/editAddress",
		method: Method.POST,
		data: params,
	});
}

/**
 * 删除用户地址
 * @returns {AxiosPromise}
 */
export function deleteAddress(params) {
	return http.request({
		url: "/api/account/deleteAddress",
		method: Method.POST,
		data: params,
	});
}